Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor relationships service and other changes #358

Merged
merged 27 commits into from
Jan 9, 2025

Conversation

seansica
Copy link
Contributor

@seansica seansica commented Jan 7, 2025

No description provided.

vsun757 and others added 8 commits December 8, 2023 16:27
…ConfigurationService.setDefaultMarkingDefinitionsForObject

- I believe this was the source of the circular dependencies issue. There are no more circuluar imports between the AttackObjectsService, RelationshipsService, IdentitiesService, UserAccountsService, and SystemsConfigurationService.
- This method makes more sense in the systems-configuration-service module anyways, considering other similar functions are implemented there.
- Had to rename the function because an identically named function that processes STIX IDs instead of STIX objects already exists in the system-configuration-service module. We may consolidate these in the future.
@seansica seansica changed the title draft: Refactor relationships service Draft: Refactor relationships service Jan 7, 2025
- missing 'await' keyword in updateFull function
- assigned variable 'relationship' should be 'relationships' in deleteById, causing no-unused-vars and no-undef
- lazy loading not essential now that circular dependencies are eliminated
- call services from globals instead of static variables
This change consolidates object type declarations for Mongoose documents with 'type' properties.
Remove custom errors dictionary from AttackObjectsRepository (no longer in use).
The previous implementation was throwing a bunch of issues. It was easier to just start from 'develop' and and refactor it from scratch.
Identitied four methods implemented in subclasses that were being called from the parent class (BaseService) and migrated them to the parent class.
All 581 regression tests are now passing!
…thods

Converting these two methods to static would require changes throughout the service layer. Rather than exhaust time refactoring them to call the method statically, we should investigate design changes that will organically resolve the issue.
@seansica seansica changed the title Draft: Refactor relationships service Refactor relationships service and other changes Jan 9, 2025
@seansica seansica merged commit 1ddb53a into project-orion Jan 9, 2025
1 check failed
@seansica seansica deleted the refactor-relationships-service branch January 9, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants